The present invention relates generally to communications between two computers, and, more particularly, to a communication method and system that provides a persistent HTTP tunnel for a connection-oriented protocol between the two computers.
Many corporations continue to maintain their corporate computer data on what are referred to as xe2x80x9clegacy hostxe2x80x9d systems. These systems are generally older mainframe or mini-computers that cannot be easily replaced. As personal computers become more commonplace, a significant effort has been devoted to methods by which a user of a personal computer can access data stored on a legacy host. One such system is shown in FIG. 1, whereby access to a host system 10 may be through a terminal 12 directly coupled to the host system 10 that provides a local login capability. If a workstation 14 desires to connect to the host system 10 over a Local Area Network (LAN) 16, the workstation 14 runs a terminal emulator 18. A Telnet protocol is used between the host system 10 and the workstation 14 to provide the workstation 14 access to the host system 10 as if the workstation was a local terminal directly connected to the host system.
With the phenomenal growth of the Internet, a need developed to provide the ability of a user to access a host computer from anywhere in the world. A typical configuration to allow such Internet access includes a Web server 20 coupled to the host system 10 via the LAN 16. The Web server 20 is then coupled to the Internet 22 through a firewall 24. The firewall 24 enforces a security policy between a secure internal network containing the host system 10 and an untrusted network such as the Internet. The firewall may be a personal computer (PC), a router, a mainframe, a UNIX workstation, or any combination of such devices responsible for enforcing the security policy. A Web client computer 26 runs a browser program 25 to access the Web server 20 through the Internet 22.
Because the Internet 22 is an unsecured network, most firewall security policies will not allow the Web client 26 to communicate using the well known xe2x80x9cTelnet port 23,xe2x80x9d shown at 28. However, most firewalls allow communications through the well known xe2x80x9cHyperText Transfer Protocol (HTTP) port 80,xe2x80x9d shown at 30, and the secure xe2x80x9cHTTP port 443,xe2x80x9d shown at 30xe2x80x2. Therefore, a current system that provides a local login experience to a Web client 26 uses one of these HTTP ports 3030xe2x80x2. In this system, the Web server 20 runs a terminal emulator 32 that provides a Telnet session with the host system 10. The Web server 20 receives the Telnet data from the host system 10 and instead of displaying the data as a typical text screen will instead send the Telnet data to a translator 33. The translator 33 translates the Telnet data to HyperText Markup Language (HTML) statements that are sent to the browser program 25 running on the Web client 26. The browser 25 then translates the HTML statements and displays an HTML page on the Web client.
A problem with this type of system is that the translated HTML screen does not look sufficiently similar to a local login screen that the user would see if they were directly connected to the host system and the interaction with the HTML screen is not sufficiently similar to the interaction with the directly connected terminal. In certain situations, the differences may require additional training of the users on the Web client. Another problem is that the response times between a user request on the Web client 26 and the return response from the host system is more variable in comparison with a local login response time. For example, response times may range from a second to thirty seconds using the HTML screen, in comparison with response times in the range of one second to three seconds with a directly connected terminal. The variable response times are due to the nature of the HTTP protocol.
HTTP is a request/response protocol. The Web client 26, using the browser 25, establishes a connection with the Web server 20 and sends a request to the Web server. After the Web server sends a response to the browser 25, the connection is closed. Before additional requests may be handled, a new connection must be established. Even though the newer HTTP 1.1 specification provides a keep-alive mechanism that allows one connection for multiple objects on an HTML page, the connection is closed either by the Web server or the browser after a period of inactivity. The period of inactivity may range from several seconds to a fraction of a second depending on the activity on the Web server. Many protocols, including Telnet, have insufficient transaction rates to maintain an alive connection even when the Web server is only modestly loaded. Closing the connection and establishing a new connection creates significant overhead resulting in decreased performance.
Given the shortcomings associated with the prior art method of providing access to host computer systems for Web clients, there is a need for a method that uses existing standard ports in the firewall while providing more consistent response times similar to the response times of a workstation connected through a LAN to a host system. The present invention is directed to filling this need.
In accordance with this invention, a server, a client, and a method of operation are provided for a Web client to access a host system with performance and displays comparable to the performance and displays of a workstation connected through a LAN to the host system.
In accordance with one aspect of this invention, a method of providing a persistent HTTP tunnel for a persistent virtual session is provided. A data message complying with a connection-oriented protocol is generated at an endpoint of a connection-oriented virtual session. The data message is embedded into a chunked data message complying with a chunking option of an HTTP specification. The chunked data message is transmitted between a Web client and a Web server via an HTTP connection. Upon receiving any chunked data message at the Web server, the Web server parses the chunked data message and delivers the data message to one endpoint of the connection-oriented virtual session. In the other direction, upon receiving any chunked data message at the Web client, the Web client parses the chunked data message and delivers the data message to another endpoint of the connection-oriented virtual session. The chunked data messages from the Web client are interleaved with the chunked data messages from the Web server on the persistent HTTP tunnel.
In accordance with other aspects of this invention, the connection-oriented protocol is a Telnet protocol.
In accordance with still further aspects of this invention, one endpoint of the connection-oriented virtual session is a host system.
In accordance with yet further aspects of this invention, the other endpoint of the connection-oriented session is a Web client application.
In accordance with still other aspects of this invention, the Web client application is a terminal emulator.
In accordance with another aspect of this invention, a method for creating a persistent tunnel between a Web client and a Web server using an HTTP protocol for providing a persistent virtual connection between a host system and the Web client is provided. A connection between the Web client and the Web server is established using a chunking option in accordance with an HTTP protocol that allows a series of messages to be sent as chunked messages. A virtual session is established between the host system and the Web client through a Web Server extension. A plurality of host messages are transmitted from the host system to the Web server extension and inserted into a chunked host message at the Web server. The Web server forwards the chunked host messages to the Web client over the connection. The Web client parses the chunked host message and delivers the host message to an application. In the other direction, a plurality of Web client messages is transmitted from the application to a tunneling mechanism on the Web client. The tunneling mechanism inserts the client message into a chunked client message and forwards the chunked client message to the Web server over the connection. The Web server forwards the chunked client message to an extension before receiving subsequent chunked client messages. The extension parses the chunked client message and delivers the client message to the host system. The chunked data messages from the Web client are interleaved with the chunked data messages from the Web server on the persistent HTTP tunnel.
In accordance with a further aspect of the present invention, a server for providing a persistent virtual session over HTTP is provided. The server includes a server software component operable to communicate via a persistent HTTP tunnel with a first endpoint of a connection-oriented session. The server also includes an extension operable to communicate with the server software component and a second endpoint of a connection-oriented session. Upon a connect request from a client, the extension establishes a connection-oriented session with the second endpoint to provide a virtual connection-oriented session between the first endpoint and the second endpoint. After the virtual connection-oriented session is established, the extension receives one or more chunked client messages from the client. The chunked messages comply with a chunking option as specified in the HyperText Transfer Protocol. Each chunked client message includes a chunk header and a data portion. The extension forwards the data portion to the second endpoint over the connection-oriented session. The extension also receives one or more second endpoint messages from the second endpoint and encapsulates each second endpoint message into a chunked second endpoint message. The extension then forwards the chunked second endpoint message to the client that delivers the second endpoint message of the chunked second endpoint message to the first endpoint.
In accordance with other aspects of this invention, the second endpoint is a host system.
In accordance with still further aspects of this invention, the first endpoint is a client application.
In accordance with yet still further aspects of this invention, the client application is a terminal emulator.
In accordance with a further aspect of this invention, a client having a first endpoint of a connection-oriented session having a persistent virtual session with a second endpoint over HTTP is provided. The client includes an application for sending and receiving data messages complying with the connection-oriented session at the second endpoint and an HTTP tunnel mechanism. The HTTP tunnel mechanism receives the data messages generated by the application and inserts the data messages into a chunked data message complying with HTTP and transmits the chunked data messages to a Web server. The HTTP tunnel mechanism also receives chunked data messages generated by the Web server and forwards the data messages within the chunked data message to the application.
A technical advantage of the present invention is the ability to establish a connection-oriented virtual session between a host system and a Web client through the commonly available HTTP port. Both the Web server and the Web client encapsulate the connection-oriented session data, such as Telnet, into chunks that comply with the HTTP specification. The Web server transmits the HTTP response as soon as the request is received and transmits chunked messages and receives chunked messages from the Web client in an interleaving manner without completing the original request. Because the chunks are interleaved, the present invention provides a persistent bi-directional virtual connection between the host system and the Web client.